<template>
	<div class="buy">
		<search></search>
		<search-all></search-all>
		<search-content v-if="buyTicket" :buyTicket="buyTicket"></search-content>
	</div>
</template>

<script>
	import search from './buy/search.vue'
	import searchAll from './buy/searchAll.vue'
	import searchContent from './buy/searchContent.vue'

	export default {
		name: "buy",
		components: {
			search,
			searchAll,
			searchContent
		},
		data(){
			return{
				buyTicket: ""
			}
		},
		methods: {
			getBuyTicket(){
				this.$http.get("/api/buyTicket").then(res=>{
					console.log(res)
					this.buyTicket = res.data.data.cinemaList;
				})
			}
		},
		created(){
			this.getBuyTicket();	//购票页面
		}
	}
</script>

<style lang="scss" scoped>
</style>
